//package com.wanger.swc.util.messagePush.test;
//
//import com.wanger.swc.model.Result;
//import com.wanger.swc.util.messagePush.SseEmitterUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
//
//@RestController
//@RequestMapping("/sseSendMessTest")
//@Api(tags = "sse推送消息测试！")
//public class SseSendController {
//
//    @CrossOrigin
//    @ApiOperation("注册上线 准备推送")
//    @GetMapping(value = "/notification/{userId}", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
//    public SseEmitter notification(@PathVariable("userId") String userId) {
//        return SseEmitterUtil.connect(userId);
//    }
//
//    @PostMapping("/test")
//    @ApiOperation("指挥调度-推送消息")
//    public Result<Void> test(@RequestBody SendReq req) {
//        SseEmitterUtil.sendData(req.getUserId(), req);
//        return Result.ok();
//    }
//
//
//}
